import request from '@/utils/request'

// 查询床位房型列表
export function listRoom(floorId) {
  return request({
    url: '/residing/room/list/' + floorId,
    method: 'get'
  })
}

// 查询床位房型详细
export function getRoom(id) {
  return request({
    url: '/residing/room/' + id,
    method: 'get'
  })
}

// 新增床位房型
export function addRoom(data) {
  return request({
    url: '/residing/room',
    method: 'post',
    data: data
  })
}

// 修改床位房型
export function updateRoom(data) {
  return request({
    url: '/residing/room',
    method: 'put',
    data: data
  })
}

// 删除床位房型
export function delRoom(id) {
  return request({
    url: '/residing/room/' + id,
    method: 'delete'
  })
}

// 查询楼层列表
export function listFloor() {
  return request({
    url: '/residing/floor/list/',
    method: 'get'
  })
}

// 新增楼层
export function addFloor(data) {
  return request({
    url: '/residing/floor',
    method: 'post',
    data: data
  })
}

// 修改楼层
export function updateFloor(data) {
  return request({
    url: '/residing/floor',
    method: 'put',
    data: data
  })
}

// 删除楼层
export function delFloor(id) {
  return request({
    url: '/residing/floor/' + id,
    method: 'delete'
  })
}

// 新增床位
export function addBed(data) {
  return request({
    url: '/residing/bed',
    method: 'post',
    data: data
  })
}

// 修改床位
export function updateBed(data) {
  return request({
    url: '/residing/bed',
    method: 'put',
    data: data
  })
}

// 删除床位
export function delBed(id) {
  return request({
    url: '/residing/bed/' + id,
    method: 'delete'
  })
}


